import ddddocr


def decode_image(path):
    ocr = ddddocr.DdddOcr()
    # 打开一张图片
    with open(file=path, mode='rb') as f:
        img_bytes = f.read()
        res = ocr.classification(img_bytes)
        return res


if __name__ == '__main__':
    print(decode_image('D:\\Pyworkspace\\Project_playwright\\image\\verifyCode.png'))
